#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <fcntl.h>
#include <sys/ioctl.h>

#define MINS 1
#define HOURS 2
#define DAYS 3

int main(int argc,char **argv)
{
  int fptr;
  int parm = 0;
  int mins,hours,days;

  printf("\nOpening driver now");
  if((fptr = open("/dev/di",O_WRONLY))<0)
    {
      printf("\nopen failed, returned = %d",fptr);
      exit(1);
    }

  mins = ioctl(fptr,MINS,parm);
  hours =  ioctl(fptr,2,parm);
  days = ioctl(fptr,DAYS,parm);

  printf("%d - %d - %d\n",days,hours,mins);
  
  
  return 0;
}
